<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>林区防火远程监控系统平台</title>
    <link rel="stylesheet" href="js/bootstrap.min.css">
    <script src="js/jquery-1.12.4.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="css/logincss/login.css">
    <script type="text/javascript">
        $(function () {
            $("#btn_reset").on("click",function () {
                $("#username").val("");
                $("#password").val("");
            })
        });
    </script>
    <style type="text/css">
        body{
            background-image: url("images/login/back.jpg");
            background-repeat: no-repeat;
            margin: 0;
        }
        #username{
            background-image: url("images/icon/username.png");/*设置小图标为背景*/
            background-size:18px 18px;/*设置小图标的 大小*/
            background-position: 200px 9px;/*设置小图标的位置*/
            background-repeat:no-repeat ;/*设置小图标不重复*/
            border: 1px solid gray;
        }
        #password{
            background-image: url("images/icon/password.png");/*设置小图标为背景*/
            background-size:18px 18px;/*设置小图标的 大小*/
            background-position: 200px 10px;/*设置小图标的位置*/
            background-repeat:no-repeat ;/*设置小图标不重复*/
            border: 1px solid gray;
        }
    </style>
</head>
<body>
    <div class="divForm">
        <form method="post" th:action="@{/login}">
            <div class="form-group has-feedback">
                <p th:if="${session.loginMsg != null}" style="color: red" th:text="${session.loginMsg}"></p>
                <input id="username" required type="text" class="form-control " th:value="${session.username}" placeholder="用户名" th:autofocus="${session.username==null?'true':'false'}" name="username">
                <p th:if="${userMsg != null}" style="color: red" th:text="${userMsg}"></p>
            </div>
            <div class="form-group">
                <input id="password" required type="password" class="form-control" placeholder="密码" th:autofocus="${session.username==null?'false':'true'}" name="password">
                <p th:if="${pwMsg != null}" style="color: red" th:text="${pwMsg}"></p>
            </div>
            <button id="btn_login" type="submit" class="btn btn-success">登录</button>
            <input id="btn_reset" type="button" class="btn btn-danger" value="重置" style="width: 54px; height: 33px">
        </form>
    </div>
</body>
</html>